
package stcu;

import stcu.robjects.*;
import com.nvlled.route.*;

import java.util.*;
import java.net.*;

public class GroupInfo {

    private SocketAddress creatorAddress;
    private String groupTitle;
    private String creatorName;
    private String creatorId;
    private String groupId;

    public GroupInfo(String id, GroupCreate obj) {
        groupId = id;
        creatorAddress = obj.getSourceAddress();
        creatorName = obj.getName();
        creatorId = obj.getIDNumber();
        groupTitle = obj.getTitle();
    }

    public String getId() {
        return groupId;
    }

    public String getIDNumber() {
        return creatorId;
    }

    public String getName() {
        return creatorName;
    }

    public String getTitle() {
        return groupTitle;
    }

    public SocketAddress getAddress() {
        return creatorAddress;
    }
    
    @Override
    public boolean equals(Object obj) {
        GroupInfo g = (GroupInfo) obj;
        return getId().equals(g.getId());
    }
}
